{% extends "common/page_base.html" %}  {# common/page_base.html extends layout.html #}
{% from "common/form_macros.html" import render_field, render_checkbox_field, render_submit_field %}
{% block content %}
	<div class="wrapper">
		<div class="container">
			<div class="col-md-6"></div>
			<div class="col-md-6">
				<h1>使用WNote笔记</h1>

				<p>原来你的创作还可以更愉快</p>

				{% if not current_user.is_authenticated %}
					<p>
						To view the User page, you must
						<a href="{{ url_for('user.login') }}">Sign in</a> or
						<a href="{{ url_for('user.register') }}">Register</a>.
					</p>
				{% endif %}

				<p>
					Test users:<br/>
					- user@example.com / Password1<br/>
					- admin@example.com / Password1
				</p>
			</div>
		</div>
	</div>
	<div class="wrapper ">
		<div class="container">
			<div class="col-md-6">
				<h1>使用WNote笔记</h1>

				<p>原来你的创作还可以更愉快</p>

				{% if not current_user.is_authenticated %}
					<p>
						To view the User page, you must
						<a href="{{ url_for('user.login') }}">Sign in</a> or
						<a href="{{ url_for('user.register') }}">Register</a>.
					</p>
				{% endif %}

				<p>
					Test users:<br/>
					- user@example.com / Password1<br/>
					- admin@example.com / Password1
				</p>
			</div>
			<div class="col-md-6"></div>
		</div>
	</div>
	<div class="wrapper">
		<div class="container">
			<div class="col-md-6"></div>
			<div class="col-md-6">
				<h1>使用WNote笔记</h1>

				<p>原来你的创作还可以更愉快</p>

				{% if not current_user.is_authenticated %}
					<p>
						To view the User page, you must
						<a href="{{ url_for('user.login') }}">Sign in</a> or
						<a href="{{ url_for('user.register') }}">Register</a>.
					</p>
				{% endif %}

				<p>
					Test users:<br/>
					- user@example.com / Password1<br/>
					- admin@example.com / Password1
				</p>
			</div>
		</div>
	</div>
	<div class="wrapper">
		<div class="container">
			<form action="/user/register" method="POST" novalidate formnovalidate class="form" role="form"
				  style="max-width: 480px; margin: 1rem auto">
				{{ form.hidden_tag() }}

				{# Username or Email #}
				{% set field = form.username if user_manager.enable_username else form.email %}
				<div class="form-group {% if field.errors %}has-error{% endif %}">
					{# Label on left, "Already registered? Sign in." on right #}
					<div class="row">
						<div class="col-xs-6">
							<label for="{{ field.id }}" class="control-label">{{ field.label.text }}</label>
						</div>
						<div class="col-xs-6 text-right">
							{% if user_manager.enable_register %}
								<a href="{{ url_for('user.login') }}" tabindex='290'>
									{% trans %}Already registered? Sign in.{% endtrans %}</a>
							{% endif %}
						</div>
					</div>
					{{ field(class_='form-control', tabindex=210) }}
					{% if field.errors %}
						{% for e in field.errors %}
							<p class="help-block">{{ e }}</p>
						{% endfor %}
					{% endif %}
				</div>

				{% if user_manager.enable_email and user_manager.enable_username %}
					{{ render_field(form.email, tabindex=220) }}
				{% endif %}

				{{ render_field(form.password, tabindex=230) }}

				{% if user_manager.enable_retype_password %}
					{{ render_field(form.retype_password, tabindex=240) }}
				{% endif %}

				{{ render_submit_field(form.submit, tabindex=280) }}
			</form>
		</div>
	</div>

{% endblock %}
